<?php
class khachhangdb{
	public function Them($MaKH, $TenKH, $DiaChi, $SDT){
		$data = new dataservice;
		$sql = "INSERT INTO `khachhang`(`MaKH`, `TenKH`, `DiaChi`, `SDT`)"
			+"VALUES($MaKH, $TenKH, $DiaChi, $SDT)";
		return $data->ExecuteNoneQuery($sql);
	} 
	
	public function Xoa($MaKH){
		$data = new dataservice;
		$sql = "DELETE FROM `khachhang` WHERE MaKH=$MaKH";
		return $data->ExecuteNoneQuery($sql);
	}
	
	public function LayDanhSach(){
		$data = new dataservice;
		$sql = "SELECT * FROM `khachhang`";
		return $data->ExecuteQuery($sql);
	}
}
?>